home *** CD-ROM | disk | FTP | other *** search
- <HTML>
-
- <HEAD>
-
- <TITLE>Displaying Context-Sensitive Menus Using Mouse Position</TITLE>
-
- <STYLE>
-
- .contextMenu { position: absolute; background-color: #CCCCCC;
-
- font-family: arial, helvetica, sans-serif;
-
- font-size: 10pt; margin: 10; border: solid 1 gray; }
-
- </STYLE>
-
-
-
- <SCRIPT>
-
- function showDefaultMenu()
-
- {
-
- if (event.ctrlKey)
-
- {
-
- document.all.defaultMenu.style.left = event.x;
-
- document.all.defaultMenu.style.top = event.y;
-
- document.all.defaultMenu.style.display = "";
-
- }
-
- }
-
-
-
- function hideDefaultMenu()
-
- {
-
- document.all.defaultMenu.style.display = "none";
-
- }
-
- </SCRIPT>
-
- </HEAD>
-
-
-
- <BODY onMouseDown="showDefaultMenu();" onMouseUp="hideDefaultMenu();">
-
- <H2>Displaying Context-Sensitive Menus Using Mouse Position</H2>
-
-
-
- <DIV ID=defaultMenu CLASS=contextMenu STYLE="display: none; width: 100;">
-
- Cut<BR>
-
- Copy<BR>
-
- Paste<BR>
-
- </DIV>
-
-
-
- </BODY>
-
- </HTML>
-
-